// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   ValidataRecord.java

package validata;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class ValidataRecord
{

	public boolean flag;
	private String dbase;
	private String table;
	private String field;
	private String fieldValue;
	private nseer_db dba;

	public ValidataRecord()
	{
		dbase = "";
		table = "";
		field = "";
		fieldValue = "";
	}

	public boolean validata(String dbase, String table, String field, String fieldValue)
	{
		this.dbase = dbase;
		this.table = table;
		this.field = field;
		this.fieldValue = fieldValue;
		try
		{
			dba = new nseer_db(dbase);
			ResultSet rs = dba.executeQuery((new StringBuilder("select * from ")).append(table).append(" where ").append(field).append("='").append(fieldValue).append("'").toString());
			if (rs.next())
				flag = true;
			else
				flag = false;
			dba.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return flag;
	}
}
